home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 569 / dump / dump.doc next >
Text File  |  1991-10-19  |  5KB  |  120 lines

  1.                           HEXADECIMAL DUMP PROGRAM
  2.                           ========================
  3.  
  4.    This program is designed to provide a listing of every hexadecimal word
  5. in a TOS file.  It differs from the standard PRINT and SHOW utilities built
  6. into TOS in that it can be used to dump any kind of file - not just text.
  7. The program produces a listing in hexadecimal, which can be directed to the
  8. screen or to the printer.
  9.  
  10.                         ASSEMBLY OF DUMP.TOS
  11.    The source code for DUMP.TOS comes in the file DUMP.S. I assembled it
  12. using a two-drive system.  In drive A, place a disk containing the files:
  13.    BATCH.PRG
  14.    AS68.PRG
  15.    AS68SYMB.DAT
  16.    LINK68.PRG
  17.    RELMOD.PRG
  18. In drive B, place a disk containing the file DUMP.S.
  19.     Create a file called ASMDUMP.BAT with the following commands:
  20. AS68 -U -L B:DUMP.O
  21. LINK68 B:DUMP
  22. RELMOD B:DUMP.68K B:DUMP.TOS
  23.     Now click on BATCH.PRG in drive A.  If you have not already done so,
  24. install it as an application for .BAT files.
  25.    Finally, double click on ASMDUMP.BAT, which you have just created.
  26. The program will create the files DUMP.O, DUMP.68K and DUMP.TOS.  Throw away
  27. the files DUMP.O and DUMP.68K.
  28.    The program DUMP.TOS can be clicked directly, or can be used with
  29. parameters from a batch file.  If you start DUMP.TOS without parameters, you
  30. will type in a command line which selects the files to dump and the destination
  31. (screen or printer) of the display.
  32.  
  33.                              THE COMMAND LINE
  34.    DUMP.TOS gets its instructions from a COMMAND LINE.  If parameters are
  35. used, either from GEM or from a batch file, the parameters become the command
  36. line.  If there are no parameters, you will have to type the command line.
  37. Commands consist of filenames or single characters.
  38.    For example, you could enter DUMP.TOS from a batch file like this:
  39.  
  40. DUMP B:SAMPLE.PRG
  41.  
  42. This will enter DUMP.TOS and cause it to display the contents of the
  43. file B:SAMPLE.PRG on the screen.  (You could also do this by clicking on
  44. DUMP.TOS and typing "B:SAMPLE.PRG")
  45.     You can type more than one file name, like this:
  46.  
  47. DUMP B:SAMPLE.PRG B:EXAMP.PRG B:EXAMP.68K
  48.  
  49. This will cause all three files to be displayed in sequence, separated by
  50. horizontal lines on the screen.
  51.     To dump to the printer, precede your file with "P ", like this:
  52.  
  53. DUMP P B:SAMPLE.PRG
  54.  
  55. This will cause DUMP.TOS to list the contents of B:SAMPLE.PRG on the printer.
  56. NOTE:if the printer is not connected or selected, DUMP.TOS will display
  57. "Printer not ready!" and continue to display to the screen.
  58.     You can also mix dumping to the printer with dumping to the screen.  To
  59. return to the screen, use "S ", like this:
  60.  
  61. DUMP P B:SAMPLE.PRG S B:SAMPLE.PRG
  62.  
  63. will dump B:SAMPLE.PRG twice, first to the printer (P), then to the screen (S).
  64.     You can order DUMP.TOS to wait between dumps (possibly while you change
  65. disks.)  You do this by typing "W " on the command line, like this:
  66.  
  67. DUMP P DISK1.PRG W DISK2.PRG
  68.  
  69. This will dump DISK1.PRG to the printer, then put up the message
  70. --Press a key--
  71. on the screen.  When you press a key, DISK2.PRG will be sent to the printer.
  72. When all dumps are finished, DUMP.TOS will do an automatic wait if it is
  73. dumping to the screen, but will stop if dumping to the printer.
  74.  
  75.                          FORMAT OF THE DUMP
  76.      DUMP.TOS displays files to the screen in this format.
  77.  
  78. File: B:SAMPLE.PRG  <==File name
  79.  
  80. 00000000   0D0A 2A2A 4170 7374 6172 7420 636F 7079      ..**Apstart copy
  81.   A         A    A    A    A    A    A    A    A              A
  82.   !         !    !    !    !    !    !    !    !              !
  83. Byte     Word 1  !  Word 3 !  Word 5 !  Word 7 !         Bytes 0-15
  84. Count          Word 2    Word 4    Word 6    Word 8
  85.                             :
  86.                             :
  87. 00002720  0D0A 2A00                                     ..*
  88.   A        A    A                                        A
  89.   !        !    !                                        !
  90. Byte       !   Last Word                               Last Bytes
  91.    Next-to-Last Word
  92.  
  93. ---------------------------------------------
  94. In this example, the file was 2723 bytes long.  The lower byte of the last
  95. word is "junk" and can be ignored.
  96. All bytes are displayed as characters on the right side of each line.  If a
  97. character is a control character which cannot be displayed, it is converted
  98. to a period.
  99.  
  100.                         PAUSING THE DUMP
  101.     At any time after you type the command line, you may stop DUMP.TOS
  102. to examine the dump or manipulate the printer.  Do this by pressing the SPACE
  103. bar.  DUMP.TOS will stop at the end of the line and display
  104. --More--
  105. Pressing the SPACE bar will cause the next line to be displayed.  You can
  106. continue to display lines one at a time with the SPACE bar.  To return to
  107. continuous display, press RETURN.
  108.     Press CTRL-C at any time to cancel the dump entirely.  DUMP.TOS will move
  109. on to the next item in the command line.
  110.  
  111.                            GUILT AND RESPONSIBILITY
  112.    Please place the blame for this program on:
  113.                          Silas Warner
  114.                          MicroProse Software
  115.                          120 Lakefront Drive
  116.                          Hunt Valley, MD  21117
  117.                          301-667-1151
  118. And watch for SILENT SERVICE, MicroProse's new ST game that puts the entire
  119. Pacific Ocean in your cot getting it wet!
  120.